﻿/**
 *	html/pem_main.js
 *
 *	(C) 2014 Yuanjj
 *
 * 	history:
 * 		2014-07-07		create the file
 */

/**
 *	main js
 */
function main()
{
    init_error();
    init_plugins();			/* in "form_field.js" */
    init_data_model();		/* in "pem_data.js" */
    load_data();			/* in "pem_data.js" */
}

/**
 *	create the main panel
 */
var g_panel_main;
function create_main_panel()
{
    var panel_main = new Ext.panel.Panel
    ({
         id:"panel_main",
         layout:"fit",
         listeners:{
             render:_set_panel_size,
             afterrender:_create_subpanel_for_main,
         }
    });

    // the global object
    g_panel_main = panel_main;
    g_panel_main.render( Ext.getBody() );
}

/**
 *	set panel size
 */
function _set_panel_size( )
{
}

/**
 *	create subpanel for main
 *
 *	@panel_main			[in] the main panel object
 */
function _create_subpanel_for_main( panel_main )
{
    //qt_html.init_window_size();
    create_login_panel( panel_main );		// in "pem_login.js"
    create_monitor_panel( panel_main );		// int "pem_monitor.js"
}
